Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

undefined method 'label_tag'

#22

In views/users/new.html.erb, usage of label_tag needs to be changed to label because of use inside of a form_for helper.

Recommended changes:

Sign up as a new user

<% @user.password = @user.password_confirmation = nil %>

<%= error_messages_for :user %> <% form_for :user, :url => users_path do |f| -%>

<%= f.label 'login' %>
<%= f.text_field :login %>

<%= f.label 'email' %>
<%= f.text_field :email %>

<%= f.label 'password' %>
<%= f.password_field :password %>

<%= f.label 'password_confirmation', 'Confirm Password' %>
<%= f.password_field :password_confirmation %>

<%= submit_tag 'Sign up' %>

<% end -%>

Reported by celeretaudax · October 21st, 2008 @ 01:52 PM

State: new
Milestone: none
Assigned to: mrflip mrflip

Activity

  1. celeretaudax
    celeretaudax

    Also getting errors on label_tag usage in views/sessions/new.html.erb.

    October 21st, 2008 @ 01:58 PM

  2. ronin-41023 (at lighthouseapp)
    ronin-41023 (at lighthouseapp)

    I was using rails 2.0.2 and got this same error. I upgraded to 2.2.2 and it works fine. The fix on your first post completely breaks the sign up form as well.

    December 16th, 2008 @ 12:52 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.